<local:DocumentBase x:Class="WPFExcelReport.SXNVK05"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls" 
                     xmlns:WG="clr-namespace:WPFExcelReport;assembly=TWGBST"
                    xmlns:WD="clr-namespace:WPFExcelReport;assembly=TWDECK" 
                    xmlns:WS="clr-namespace:WPFExcelReport;assembly=TWASTAMM" 
                    xmlns:KD="clr-namespace:WPFExcelReport;assembly=TKDSTAMM"  
                    xmlns:VP="clr-namespace:WPFExcelReport;assembly=TVVPACK"  
                    xmlns:VF="clr-namespace:WPFExcelReport;assembly=TVAFARBEN" 
                    xmlns:VKK="clr-namespace:WPFExcelReport;assembly=TVKKOPF" 
                    xmlns:VKP="clr-namespace:WPFExcelReport;assembly=TVKPOS" 
                    xmlns:ZB="clr-namespace:WPFExcelReport;assembly=TVKZUAB"   
                    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls"   
                    xmlns:VR="clr-namespace:WPFExcelReport;assembly=TVRKOPF"  
                    xmlns:VRP="clr-namespace:WPFExcelReport;assembly=TVRPOS"
                    xmlns:VVT="clr-namespace:WPFExcelReport;assembly=TVVTLIEF"
                    xmlns:ZA="clr-namespace:WPFExcelReport;assembly=TZABED"  
                    xmlns:MAH="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization"  
                    xmlns:me="clr-namespace:WPFExcelReport"
                    xmlns:TXT="clr-namespace:WPFExcelReport;assembly=TTXTIND"  
                    Name="TV"  
                    Loaded="Window_Loaded"
>
    <local:DocumentBase.Resources>
        <ucd:BoolToVisibilityConverter x:Key="bv"/>
         <ucd:Divideby10000 x:Key="dw"/>
         <ucd:NOTBoolToVisibilityConverter x:Key="nbv"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <ucd:NOTConverter  x:Key="not"/>
    </local:DocumentBase.Resources>
    <DockPanel>
        <ex:AniScrollViewer 
            DockPanel.Dock="Bottom"    
            Visibility="{Binding IsShowBottom,ElementName=TV,Converter={StaticResource bv}}">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"></RowDefinition>
                    <RowDefinition Height="Auto"></RowDefinition>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="1*"></ColumnDefinition>
                    <ColumnDefinition Width="1*"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <WS:TWASTAMM  Grid.Row="0" Grid.Column="0" Margin="10" 
                           IsAuto="True" 
                           ORDERNUM="{Binding PRART,ElementName=cWD}"/> 
                <ZB:TVAPR  Grid.Row="0" Grid.Column="1"
                           VKZAUF="{Binding VART,ElementName=cVKP}"/>
            </Grid>
        </ex:AniScrollViewer>
        <ex:AniScrollViewer DockPanel.Dock="Right" 
                    MaxWidth="400"
                    Visibility="{Binding IsShowRight,ElementName=TV,Converter={StaticResource bv}}" >
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"></RowDefinition>
                    <RowDefinition Height="Auto"></RowDefinition>
                    <RowDefinition Height="Auto"></RowDefinition>
                    <RowDefinition Height="Auto"></RowDefinition>
                    <RowDefinition Height="Auto"></RowDefinition>
                    <RowDefinition Height="Auto"></RowDefinition>
                </Grid.RowDefinitions> 
                <VRP:TVKKVR05 Grid.Row="1" 
                     VKK="{Binding AUF,ElementName=cVKP}" 
                   IsAuto="False"  />
                <VR:TVR04  Grid.Row="2" Name="cVRK" 
                        IsAuto="{Binding IsAutoVRK,ElementName=cVKK}"
                        VKK="{Binding AUF,ElementName=cVKK}"
                        KEY="{Binding RENR,ElementName=cVKK}" 
                        />
               
            </Grid>
        </ex:AniScrollViewer>
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"></RowDefinition>
                <RowDefinition Height="1*"></RowDefinition>
            </Grid.RowDefinitions>
            <WrapPanel Grid.Row="0"  Visibility="{Binding KDBLOCK,ElementName=cKD,Converter={StaticResource bv}}">
                <TextBlock    Margin="5"
                              Foreground="Red"
                            Text="{Binding Source={Localization:Translate Word=KDCREDITEXC}}"
                       />
                <TextBlock   Margin="5"
                             Foreground="Red"
                            Text="{Binding VKBLOCK,ElementName=cKD}"
                       />
                <CheckBox Content="{Binding Source={Localization:Translate Word=关闭此提示}}"   Foreground="Red"
                            Margin="5,0,0,0"
                          IsChecked="{Binding KDBLOCK,ElementName=cKD,Converter={StaticResource not}}"/>

            </WrapPanel>
            <Grid Grid.Row="1" >

                <Grid.RowDefinitions>
                <RowDefinition   Height="Auto" />
                <RowDefinition   Height="1*" />
                <RowDefinition   Height="Auto" />
                <RowDefinition   Height="Auto" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="1*"></ColumnDefinition>
                <ColumnDefinition Width="1*"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <VKK:TSTVK04 Name="cVKK"  Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"
                         IsMTR="{Binding IsMTR,ElementName=cVKP}"
                         IsKG="{Binding IsKG,ElementName=cVKP}"
                         IsOrder="True"
                          KDBLOCK="{Binding KDBLOCK,ElementName=cKD}"   
                          IsCanDelete="{Binding IsCanDelete,ElementName=TV}" 
                          IsCanNew="{Binding IsCanNew,ElementName=TV}" 
                         IsCanChg="{Binding IsCanChg,ElementName=TV}"  
                         IsChgZA="{Binding IsChgZA,ElementName=TV}"
                          ScopeManage="{Binding ScopeManage,ElementName=TV}" 
                         
                      />
            <WD:TPWD02 Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"
                       Visibility="Collapsed"
                       IsAuto="{Binding IsAutoEK,ElementName=cVKK}"
                       EKAUF="{Binding EKAUF,ElementName=cVKK}"
                       VKK="{Binding AUF,ElementName=cVKK}"/>
            <VKP:TSTVKPOS  Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2"
                           KURS="{Binding KURS,ElementName=cVKK}"
                     Name="cVKP" 
                     ARTST="F" 
                     IsPrice="True"   
                     IsAuto="True" 
                     IsCanDelete="{Binding IsCanDelete,ElementName=TV}" 
                     IsCanNew="{Binding IsCanNew,ElementName=TV}" 
                      IsCanChg="{Binding IsCanChg,ElementName=TV}" 
                     IsCanCopy="{Binding IsCanCopy,ElementName=TV}"  
                      BSTSTA="{Binding KDSTA,ElementName=cVKK}"      
                      WERT="{Binding WERT,ElementName=cVKK}"  
                      dwVKK="{Binding dwVKK,ElementName=cVKK}"  
                     IsEdit="{Binding IsEdit,ElementName=cVKK}" 
                     IsSaved="{Binding IsSaved,ElementName=cVKK}" 
                     MinWidth="200" MinHeight="50" />
                <Expander  Grid.Row="2" Grid.Column="0"   IsExpanded="True">
                <Expander.Header>
                    <WrapPanel>
                        <TextBlock Text="{Binding Source={Localization:Translate Word=附加费}}"></TextBlock>
                        <TextBlock Text="{Binding INFO,ElementName=cZBP}"></TextBlock>
                    </WrapPanel>
                </Expander.Header>
                <ZB:TVKZUAB  Name="cZBP" 
                        Margin="10"
                        IsAuto="True"   
                        MaxHeight="300" 
                        VKZSA="VK"
                       ORDERNUM="{Binding AUF,ElementName=cVKP}"  />
            </Expander>
         
            <Expander Grid.Row="2" Grid.Column="1" IsExpanded="True">
                <Expander.Header>
                    <WrapPanel>
                        <TextBlock Text="{Binding Source={Localization:Translate Word=生产发货信息}}"/>
                        <TextBlock Text="{Binding INFO,ElementName=cWD}"></TextBlock>
                    </WrapPanel>
                </Expander.Header>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="1*"></ColumnDefinition>
                        <ColumnDefinition Width="1*"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <VVT:TVVTLIEF  Grid.Column="0"  Name="cVVT"  
                                 IsWBREQ="False"  
                                 IsAuto="False" 
                                 VKP="{Binding AUF,ElementName=cVKP}"
                               />
                    <StackPanel  Grid.Row="0" Grid.Column="1">
                        <WD:TWDECK  Name="cWD"   
                                    ORDERNUM="{Binding AUF,ElementName=cVKP}"
                                    IsOrder="True"
                                   />
                        <WG:TWGBST dwWD="{Binding dwWD,ElementName=cWD}"/>
                    </StackPanel>
                </Grid>
            </Expander>
            <Expander  Grid.Row="3" Grid.Column="0">
                <Expander.Header>
                    <WrapPanel>
                        <TextBlock Text="{Binding Source={Localization:Translate Word=客户信息}}"></TextBlock>
                        <TextBlock Text="{Binding INFO,ElementName=cKD}"></TextBlock>
                    </WrapPanel>
                </Expander.Header>
                <KD:TKD Grid.Row="0" Name="cKD"
                            ORDERNUM="{Binding KUNDNR,ElementName=cVKK}"   
                            />
            </Expander>
            <Expander  Grid.Row="3" Grid.Column="1">
                <Expander.Header>
                    <WrapPanel>
                        <TextBlock Text="{Binding Source={Localization:Translate Word=发票信息}}"></TextBlock>
                        <TextBlock Text="{Binding INFO,ElementName=cVR05}"></TextBlock>
                    </WrapPanel>
                </Expander.Header>
                    <VRP:TVR05 Grid.Row="3" ARTST="F" Name="cVR05"
                          IsFilterByVKP="True"
                          MaxHeight="300"
                          IsAuto="False"
                          RENR="{Binding KEY,ElementName=cVRK}"
                          dwZB="{Binding dwZB,ElementName=cZBP}"  
                          dwVKP="{Binding dwVKP,ElementName=cVKP}"  
                         />
            </Expander>
            
        </Grid>
        </Grid>
    </DockPanel>
</local:DocumentBase>
    
